package com.zlp.spring.init.service;

import com.zlp.spring.init.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

@Service
@Scope(value = "prototype")
public class UserService {

    @Autowired
    private TestService testService;


   public User getUser(){
       User user = new User();
       user.setUserName("给自己一个 smile");
       user.setAge(29);
       System.out.println(user.toString());
       return user;
    }

    public String getMood(){
        System.out.println(testService);
        String mood = testService.getMood();
        return mood;
    }
}
